﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Login</title>
    <link href="~/Content/login.css" rel="stylesheet" />
    <link rel="stylesheet" media="screen" href="~/Pulgins/particles/css/style.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_811089_dzruila3voe.css">
    <link rel="stylesheet" href="~/Pulgins/bootstrap/css/bootstrap.min.css" >
    <script src="~/Scripts/jquery-1.7.1.min.js" ></script>
    <script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" ></script>
    <script src="~/Pulgins/bootstrap/js/bootstrap.min.js" ></script>
</head>
<body>

    <!-- 离子特效 -->
    <div id="particles-js"></div>

    <!-- scripts -->
    <script src="~/Pulgins/particles/particles.min.js"></script>
    <script src="~/Pulgins/particles/js/app.js"></script>

    <!-- stats.js -->
    <script src="~/Pulgins/particles/js/lib/stats.js"></script>

    <!-- 登录 -->
    <div id="content">
        @*<canvas class="imgs" style="background: #4fdeed;"></canvas>*@
        <form id="from1" method="post" action="/Login">
            <div class="from-drom">
                <div class="input-group ">
                    <div class="input-group-prepend">
                        <span class="input-group-text ">
                            <i class="icon SkyUI icon-user"></i>
                        </span>
                    </div>
                    <input type="text" name="Name" id="Name" class="form-control" placeholder="用户名" aria-label="Default" value="leyipai001" aria-describedby="inputGroup-sizing-default">
                </div>
                <span class="yan">
                    请输入用户名
                </span>
            </div>
            <div class="from-drom">
                <div class="input-group ">
                    <div class="input-group-prepend">
                        <span class="input-group-text">

                            <i class="icon SkyUI icon-lock"></i>
                        </span>
                    </div>
                    <input type="password" name="Pwd" id="Pwd" value="123" class="form-control" placeholder="密码" aria-label="Default" aria-describedby="inputGroup-sizing-default">
                </div>
                <span class="yan">请输入密码</span>
            </div>
            <div class="from-drom">
                <div class="input-group">
                    <div class="input-group-prepend"><span class="input-group-text">验证码</span></div>
                    <input type="text" name="validateCode" id="Yan" class="form-control" placeholder="- - - -" aria-label="Default" aria-describedby="inputGroup-sizing-default">
                    <div class="input-group-append">
                        <img src="/login/Vlidate?id=1" id="Image1" width="80" height="38" style="border:1px solid #dedbdb;">
                    </div>
                </div>
                <span class="yan">请输入验证码</span>
            </div>
            <div class="from-drom">
                <button type="button" id="from-subimt" class="btn btn-primary btn-lg btn-block">登录</button>
            </div>
        </form>
        @if (ViewBag.Vlidate != null)
        {
            <div class="alert alert-danger" role="alert" style="top:50px;">
                @ViewBag.Vlidate
            </div>
        }
    </div>

    <script>
        window.onload = function () {
            $("#Image1").click(function () {
                $(this).attr("src", $(this).attr("src") + 1);
            });

            $("#from-subimt").click(function () {
                if ($("#Name").val() == "") {
                    $("#Name").parent(".input-group").next(".yan").css("opacity", "1");
                    return;
                } else {
                    $("#Name").parent(".input-group").next(".yan").css("opacity", "0");
                }
                if ($("#Pwd").val() == "") {
                    $("#Pwd").parent(".input-group").next(".yan").css("opacity", "1");
                    return;
                } else {
                    $("#Pwd").parent(".input-group").next(".yan").css("opacity", "0");
                }
                if ($("#Yan").val() == "") {
                    $("#Yan").parent(".input-group").next(".yan").css("opacity", "1");
                    return;
                } else {
                    $("#Yan").parent(".input-group").next(".yan").css("opacity", "0");
                }
                $("#from1").submit();
            })
        }
    </script>
</body>
</html>
